package cn.cool.netty.nio.buffer;

import java.nio.ByteBuffer;

public class TestByteBufferRead {
    public static void main(String[] args) {
        ByteBuffer buffer = ByteBuffer.allocate(10);
        buffer.put(new byte[]{0x61, 0x62, 0x63, 0x64, 0x65});
        buffer.flip();
        System.out.println((char) buffer.get());
        buffer.rewind();
        System.out.println((char) buffer.get());
    }
}
